Nested Class:
   Writing one class inside another class is called as Nested class OR
   Inner & Outer class.

Rules for Nested Class:

1. The inner class can access all the members of the Outer class

2. The Outer class cannot access the members of the inner class by default. If we want to access the inner class members in the Outer class then we need to create a object to inner class inside the outer class.

3. Inner class is known to only outer class hence we can't create and access the inner class outside the Outer class.

4. Inner class can be static OR protected OR private OR default OR public

5. Outer class can be public, default, final & abstract

6. Static class can access only the static members of its outer class. Static class cannot access the non-static member of the outer classes.
But non-static inner class can access the static and non-static members of the outer class.
